package com.fafi.spring.aop.bean;

import com.fafi.spring.aop.selfadvice.LogAspects;
import com.fafi.spring.aop.service.impl.MathService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy //开启基于注解的aop模式
public class MainConfig {
	@Bean
	public MathService mathCalculator() {
		return new MathService();
	}
	@Bean
	public LogAspects logAspects() {
		return new LogAspects();
	}
}
